package com.xg.mina.message;

public class MessageHeader {
    /**
     * 3字节
     */
    private Integer timestamp;
    /**
     * 消息长度
     */
    private Integer messageLength;
    /**
     * 消息类型
     */
    private Byte messageType;
    /**
     * 4个字节
     */
    private Integer messageStreamId;

    public Integer getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Integer timestamp) {
        this.timestamp = timestamp;
    }

    public Integer getMessageLength() {
        return messageLength;
    }

    public Byte getMessageType() {
        return messageType;
    }

    public void setMessageType(Byte messageType) {
        this.messageType = messageType;
    }

    public Integer getMessageStreamId() {
        return messageStreamId;
    }

    public void setMessageStreamId(Integer messageStreamId) {
        this.messageStreamId = messageStreamId;
    }

    public void setMessageLength(Integer messageLength) {
        this.messageLength = messageLength;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("MessageHeader{");
        sb.append("timestamp=").append(timestamp);
        sb.append(", messageLength=").append(messageLength);
        sb.append(", messageType=").append(messageType);
        sb.append(", messageStreamId=").append(messageStreamId);
        sb.append('}');
        return sb.toString();
    }
}
